//
//  enum.hpp
//  learnC++
//
//  Created by apple on 2018/5/24.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef enum_hpp
#define enum_hpp

#include <stdio.h>
#include <iostream>
//枚举
enum Color
{
    // Here are the enumerators
    // These define all the possible values this type can hold
    // Each enumerator is separated by a comma, not a semicolon
    COLOR_BLACK =   1 << 0,
    COLOR_RED =     1 << 1,
    COLOR_BLUE =    1 << 2,
    COLOR_GREEN =   1 << 3,
    COLOR_WHITE =   1 << 4,
    COLOR_CYAN =    1 << 5,
    COLOR_YELLOW =  1 << 6,
    COLOR_MAGENTA = 1 << 7 // see note about trailing comma on the last enumerator below
};


enum class State{
    STATE_BACK,
    STATE_FORWARD,
    STATE_UP,
    STATE_DOWN,
};


void test_enum(Color color);
void test_enum2(State s);

#endif /* enum_hpp */
